Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 postgresql #597

Open
wants to merge 373 commits into
base: testing
Choose a base branch
from
Open

V2 postgresql #597

wants to merge 373 commits into from

Conversation

ericgaspar
Copy link
Member

@ericgaspar ericgaspar commented Aug 12, 2023

  • Transition to PostgreSQL database

@Limezy
Copy link

Limezy commented Aug 24, 2023

I have successfully updated my instance using that branch - thanks !

@Limezy
Copy link

Limezy commented Aug 25, 2023

Using the app control panel to change the PHP-FPM configuration destroys something and leaves to an error 502 !
EDIT : solved by changing php version to 8.2 inside /etc/php/8.2/fpm/pool.d/nextcloud.conf. I guess there is something slightly wrong within the control panel script

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Alrighty!
Test Badge

@Limezy
Copy link

Limezy commented Oct 31, 2023

By curiosity, is there a willing to transition to PostgreSQL for the official app branch or is this supposed to live as a parallel branch until PostgreSQL becomes the official recommended database system for Nextcloud ?

@ericgaspar
Copy link
Member Author

where there's a will there's a way. More seriously this branch is more like a parallel universe for now.

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Fingers crossed!
Test Badge

@Limezy
Copy link

Limezy commented Nov 24, 2023

@ericgaspar thanks for your answer and also thanks for maintaining this parallel universe !

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Meow 🐈
Test Badge

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

May the CI gods be with you!
Test Badge

@ericgaspar
Copy link
Member Author

!testme

@Limezy
Copy link

Limezy commented Jan 10, 2024

The CI launching bot seems down

scripts/upgrade Outdated
then
ynh_script_progression --message="Migrating to PostgreSQL database..." --weight=3

ynh_backup_if_checksum_is_different --file="$install_dir/config/config.php"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this line?

scripts/upgrade Outdated
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
ynh_app_setting_delete --app=$app --key=mysqlpwd

ynh_store_file_checksum --file="${install_dir}/config/config.php"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and this one?

@YunoHost-Apps YunoHost-Apps deleted a comment from yunohost-bot Jan 10, 2024
@YunoHost-Apps YunoHost-Apps deleted a comment from alexAubin Jan 10, 2024
scripts/upgrade Outdated
Comment on lines 69 to 71
mysql_db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)

if [ -n "$mysql_db_pwd" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we can really rely on the mysqlpwd ... It's supposed to be automatically deleted and renamed to db_pwd during the v1->v2 transition (so before running this script), cf https://github.com/YunoHost/yunohost/blob/dev/src/utils/resources.py#L1366-L1372

Copy link
Member Author

@ericgaspar ericgaspar Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts/upgrade Outdated
Comment on lines 77 to 79
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name #--db_pwd=$(ynh_string_random)
#ynh_app_setting_set --app=$app --key=psqlpwd --value=$db_pwd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we are in packaging v2, the DB should already be provisioned before the upgrade happens so eeeeh

scripts/upgrade Outdated Show resolved Hide resolved
@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

🌻
Test Badge

@alexAubin
Copy link
Member

alexAubin commented Jan 10, 2024

+ sudo -u nextcloud php8.1 --define apc.enable_cli=1 occ --no-interaction --no-ansi db:convert-type --all-apps --clear-schema pgsql nextcloud 127.0.0.1 nextcloud --password=37f7b7c8d96539fff57a1df0 -n

An unhandled exception has been thrown:

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/nextcloud/lib/private/DB/Connection.php:139

hmmmzgrmbl okay we have to make sure we have the appropriate phpX.Y-mysql/psql dependency installed during the migration, to be continued

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

✌️
Test Badge

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Meow 🐈
Test Badge

@Limezy
Copy link

Limezy commented Jan 16, 2024

@alexAubin @ericgaspar do you have any idea about my case where the update fails from an already PostgreSQL migrated instance ? Many thanks !

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Living in the past, are we? 🐮👁️
Test Badge

@yunohost-bot
Copy link
Contributor

😜
Test Badge

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

🚀
Test Badge

@yunohost-bot
Copy link
Contributor

Living in the past, are we? 🐮👁️
Test Badge

@ericgaspar
Copy link
Member Author

!testme

@yunohost-bot
Copy link
Contributor

Test it, book it, worm it, technologic. 🤖 🎶
Test Badge

@yunohost-bot
Copy link
Contributor

Living in the past, are we? 🐮👁️
Test Badge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.